# API进行请求模块

import json
import requests


def super_class_V2():
    url = 'http://beta.api.baby-bus.com/super_class_V2'
    headers = {
        'CommonHeaderData': 'ewogICJhcHBfaWQiIDogIjIxMiIsCiAgImFjY291bnRfc2lnbiIgOiAiIiwKICAiY2hhbm5lbCIgOiAiYXBwU3RvcmUiLAogICJkZXZpY2VfcGxhdGZvcm0iIDogImlQYWQiLAogICJhcHBfYWdlIiA6ICIwIiwKICAiYXBwX3ZlcnNpb24iIDogIjEwLjAxLjAwMDAiLAogICJhY2NvdW50X3NpZ25fdHlwZSIgOiAiIiwKICAiZGV2aWNlX3R5cGUiIDogImlQYWQiLAogICJkZXZpY2Vfc2NyZWVuIiA6ICIyMzg4KjE2NjgiLAogICJwbGF0Zm9ybSIgOiAiMSIsCiAgImxvY2F0aW9uIiA6ICLnpo/lu7ot56aP5beeIiwKICAiZGV2aWNlX25hbWUiIDogImlQYWQ4LDEiLAogICJpZGVudCIgOiAiNDM5M0JBMTYtRjY1QS00RDA2LUE1MUUtQ0RGODRDRUZBMTYyIiwKICAic2lnbl9pZGVudCIgOiAiNjVCM0QzNDEtOUE1MC00RkE5LTg0OEQtQTQxMDg3QTZEQTZCIiwKICAibGFuZ3VhZ2UiIDogInpoIiwKICAib3NfdmVyc2lvbiIgOiAiMTIuNDAiLAogICJjb3VudHJ5IiA6ICJDTiIsCiAgImFjY291bnRfaWQiIDogIiIsCiAgImFwcF9rZXkiIDogImNvbS5zaW55ZWUuYmFieWJ1cy5yYW5jaCIKfQ==',
        'CommonHeaderSign': 'F5A9AAE3A781A7E1674CC2056880D63F',
        'CommonHeaderSignType': 'md5'
    }
    data = {
        'age': 0,
        'app_key': 'com.sinyee.babybus.ranch',
        'lang': 'zh',
        'type': '1'
    }
    response = requests.post(url=url, headers=headers, data=data)
    if response.status_code == 200:
        print(json.loads(response.content))
        # return json.loads(response.content)
    else:
        return None


